<template>
  <div>
    <van-search v-model="search_value" show-action placeholder="请输入搜索关键词" @search="onSearch">
      <template #action>
        <div @click="onSearch">搜索</div>
      </template>
    </van-search>
    <van-list>
      <van-row>
        <van-col span="12">
          <my-good-card
            v-for="leftgood in goods.leftgoods"
            :stitle="leftgood.section"
            :gtitle="leftgood.name"
            :imgsrc="leftgood.image"
            :key="leftgood.index"
            :price="leftgood.price"
          ></my-good-card>
        </van-col>
        <van-col span="12">
          <my-good-card
            v-for="rightgood in goods.rightgoods"
            :stitle="rightgood.section"
            :gtitle="rightgood.name"
            :imgsrc="rightgood.image"
            :key="rightgood.index"
            :price="rightgood.price"
          ></my-good-card>
        </van-col>
      </van-row>
    </van-list>
  </div>
</template>

<script>
import TopTopic from '../base/TopTopic'
import myGoodCard from '../base/MyGoodCard'
export default {
  name: 'GoodsSection',
  data() {
    return {
      search_value: '',
      goods: {
        leftgoods: [],
        rightgoods: []
      }
    }
  },
  beforeMount() {
  },
  methods: {
    onSearch() {}
  },
  components: {
    TopTopic,
    myGoodCard
  }
}
</script>

<style>
</style>